﻿using JMcms.Common;
using JMcms.Web.UI;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace JMcms.Web.Plugin.Job
{
   public class job: BasePage
    {
        protected int page;
        protected int totalcount;
        protected override void ShowPage()
        {
            this.page = JMRequest.GetQueryInt("page", 1);
        }
        public DataTable get_job_top_list(int top, string strwhere, string filedOrder)
        {
            DataTable dataTable = new DataTable();
            string text = "is_lock=0";
            bool flag = !string.IsNullOrEmpty(strwhere);
            if (flag)
            {
                text = text + " and " + strwhere;
            }
            return new BLL.job().GetList(top, text, filedOrder).Tables[0];
        }
        public DataTable get_job_list(int page_size, int page_index, string strwhere, out int totalcount)
        {
            DataTable dataTable = new DataTable();
            string text = "is_lock=0";
            bool flag = !string.IsNullOrEmpty(strwhere);
            if (flag)
            {
                text = text + " and " + strwhere;
            }
            return new BLL.job().GetList(page_size, page_index, text, "add_time desc", out totalcount).Tables[0];
        }
    }
}
